package com.chase.flashcleaner.data

import android.os.Environment
import com.chase.flashcleaner.entity.CleanPath
import java.io.File

private val DATA_DIRECTORY by lazy { "${Environment.getExternalStorageDirectory()}/Android/data/" }

//private const val PATH_ROOT_MOBILE_QQ = "com.tencent.mobileqq"

//val integralCleanDirectory by lazy {
//    mutableListOf(
//        File(DATA_DIRECTORY, "$PATH_ROOT_MOBILE_QQ/Tencent/MobileQQ/hotpic"),
//        File(DATA_DIRECTORY, "$PATH_ROOT_MOBILE_QQ/Tencent/MobileQQ/shortvideo"),
//        File(DATA_DIRECTORY, "$PATH_ROOT_MOBILE_QQ/Tencent/MobileQQ/head/_hd")
//    )
//}

val cleanPaths by lazy {
    val paths = File("$DATA_DIRECTORY/com.chase.flashcleaner/config/clean_paths.txt").readLines()
    paths.map {
        val temp = it.split(' ')
        CleanPath(temp[0], temp[1], (temp[2] == "1"))
    }
}

//val myCleanPaths by lazy {
//
//}